package core;

import java.awt.Point;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;

import utils.DBG;

public abstract class GameState {
	public Renderer renderer;
	public String currentState;
	private boolean paused = true;
	private boolean exit = false;

	public GameState() {
		renderer = new Renderer();
		currentState = "";
		DBG.showMsg("Creado un GameState", this);
	}

	public void post() {
		GameFlow.getInstance().paint(GameFlow.getInstance().getGraphics());
	}

	public void render() {
		renderer.render();
	}

	public abstract void update();

	public void pause() {
		paused = true;
	}

	public void resume() {
		paused = false;
	}

	public abstract void reset();

	public abstract boolean onClick(MouseEvent m);

	public abstract void updateMouse(Point p);

	public abstract void onKeyPresed(KeyEvent e);

}
